#C code
Explore tagged Tumblr posts
Text

© С-соᴅе ♡ do not edit or crop logo.
11 notes
·
View notes
Text
C Basics
I'm bored
C-code Basics
Just the basics of C
Every command ends with semi-colon => ;
Starting point of the program
int main() { }
int main(void) {}
Ending the program
return 0; }
Libraries
#include <library>
stdlib.h = standard library
stdio.h = input/output library
math.h = for maths
array.h = you won't need here, but it's good to know that it exists
print word
printf("enter letters here\n");
\n = new line
user input (number)
float = ex. 23.455
float n;
scanf("%f", &n);
int = ex. 23
int n;
scanf("%i", &n);
char = symbols, letters
char n;
scanf("%c", &n); (only one letter input!)
char = %c
int = %i, %d
float = %f
|| = or
&& = and
Loops
do... while
do {code block} while (condition)
while
while( condition) {code block}
for
for( start point; end point; counter) {code block}
example
do... while
do {
printf("do you want to repeat this block?\n");
scanf("%c" &n);
} while( n = 'y' || n = 'Y');
while
while(n<12){
printf("Please enter your number\n");
scanf("%i", &n);}
for
(i++ = i+1)
for(int i=0; i<n; i++) { printf("my number is %i", i); }
if
if( condition) {block}
else if(condition 2) {block 2}
else {block 3}
ex.
if(n < 0) { printf("%f is <0", n); }
else if( n >0) {printf("%f is >0",n); }
else {printf("%f = 0",n); }
Program Example
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int age;
float number, favnumb;
char letter;
do {
printf("Please enter your age");
scanf("%i",&age);
while(age <0) {
printf("\nError age must be bigger or equal to 0\n please enter age");
scanf("%i",&age); }
printf("\nwhat is your favourite number?\n");
scanf("%f", &favnumb);
printf("\n do you want to repeat the process?");
scanf("%c", &letter);
if(letter == 'y') {
printf("let's start again); }
else if(letter =='Y'){
printf("alright, let's start again); }
else{
do {
printf("please enter y or n");
scanf("%c"&letter);
} while(letter != 'y' || letter != 'Y')
} while (letter == 'y' || letter == 'Y')
printf("Goodbye");
return 0; }
Sorry if there are any typos or stuff
Sorry it looks ugly too :(
4 notes
·
View notes
Text
Arduino Pro Micro gear shifter (for ETS2/ATS)
Here's the source code of a quick and dirty emulator for 16 gears shifter (originally from MAN trucks) adapted to Logitech G-27 shifter/USB.
/*-------------------------------------------------- Sample code by Matthew Heironimus https://github.com/MHeironimus/ArduinoJoystickLibrary 2016-11-24 Gear shifter for MAN lever and ETS2/ATS mod by Genxha https://wolfhowls.tumblr.com/ Wiring: Lever wire > Pro Micro Pin Upper (round) button (Emulated X button index 3 joy 4) Blue > GND Yellow > 5 Side selector (Emulated B button Index 2 joy 3) Violet > 4 Green > GND Lower selector (Emulated A button - both positions index 0, 1 joy 1, 2) White > GND Red > 3 Blue* > 2 <---- Note: solder a spare wire between center position of lower selector to pin 2 -----------------------------------------------*/ #include Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, JOYSTICK_TYPE_GAMEPAD, 4, 0, // Button Count, Hat Switch Count false, false, false, // X and Y, but no Z Axis false, false, false, // No Rx, Ry, or Rz false, false, // No rudder or throttle false, false, false); // No accelerator, brake, or steering void setup() { // Initialize Button Pins for (int index = 0; index < 4; index++) { int pin = index + 2; pinMode(pin, INPUT_PULLUP); } Joystick.begin(); // Initialize for (int index = 0; index < 4; index++) { // Reset Joystick.setButton(index, !digitalRead(index + 2)); } } void loop() { int lastButtonState[4]; for (int index = 0; index < 4; index++) { // read and set initial button status lastButtonState[index] = digitalRead(index + 2); } /* Main FOR loop */ for (int index = 0; index < 4; index++) { // read button status and send joystick events int pin = index +2; int currentButtonState = !digitalRead(pin); if (currentButtonState != lastButtonState[index]) { Joystick.setButton(index, currentButtonState); lastButtonState[index] = currentButtonState; } } }
0 notes
Text

very unconventional way to convey your despair, creator of w3school's c language learning page
#c code#c language#programming#progblr#extremely new to this#no shit sherlock? youre learning the switch thing you dont even know how to use functions
0 notes
Text
Connecting SQL Statements to C#: Traceability Techniques for Seamless Integration
In the realm of software development, traceability plays a crucial role in ensuring the integrity and maintainability of your codebase. When it comes to connecting SQL statements to C# code, implementing effective traceability techniques becomes even more essential. In this article, we’ll explore practical T-SQL code examples and applications that demonstrate how to establish a robust connection…
View On WordPress
0 notes
Text

proud to be learning c++
13K notes
·
View notes
Text
Ive successfully made a Brainfuck compiler!
First I started out getting my program to read from a file
but once I knew how to write a file it was trivial to convert the Brainfuck code to C code. there's a bit of file path hard coding i'm not exactly happy with but i'm probably the only person that's gonna use this compiler.
Of course initial drafts of the compiler wrote some uncompilable code but once I got rid of the typos Its a fully functional.
I think...
0 notes
Text

#current mood#gay#wlw#sapphic#sapphics#lgbt#lgbt art#lgbt aesthetic#lgbt meme#lgbt memes#lgbtq#lgbtqia#lgbtqia+#art#cartoon art#artwork#illustration#aesthetic#a e s t h e t i c#vintage#meme#memes#humor#funny#relatable#so me coded#so me core#so me fr#black cat#source: pinterest
1K notes
·
View notes
Text


misc coding stamps graphics
#carrd#carrd resources#carrd stuff#neocities resources#webcore#neocities#website#stamps#neocities stamps#2000s#old web graphics#web graphics#web resources#software#coding#javascript#c++#python#html css#rentry decor#rentry#rentry graphics#old web
5K notes
·
View notes
Text

#vampire hunter d#castlevania#trinity blood#hellsing#the poe clan#true of vamp#black blood brothers#kekkai sensen#owari no seraph#seraph of the end#case study of vanitas#vanitas no carte#nightwalker anime#nightwalker the midnight detective#drcl midnight children#drcl#blood the last vampire#blood c#blood +#blood lad#shiki#the record of a fallen vampire#the vampire dies in no time#code vein#bloodborne#vampire knight#rosario + vampire#vampire princess miyu#tsukihime#vassalord
525 notes
·
View notes
Photo

© С-соᴅе ♡ do not edit or crop logo.
4 notes
·
View notes
Text
I distinctly remember ranting on tumblr about a problem in my code like half a year ago and I was frustrated with arrays of strings in c++ and I REMEMBER a furry adding a comment that just said “you could try parsing the string uwu” and I did it and it WORKED and I was so relieved because I had been fighting with it for like a week.
The only problem is I can’t find that post and I think I dreamt it up. I think God came to me in a dream as a furry responding to my tumblr post to help me fix my code. I am going insane why did my brain do this.
823 notes
·
View notes
Text
Honestly bro we don’t talk about how Wilbur thought doomsday was his explosion enough… like bro came back like “damn I really did a number on this place huh 😎” and then no one corrected him because like what would you say in that situation? “Oh hey sorry bro no ur massively important suicide bombing that you’ve defined your entire sense of self around was like fixed on a week. That hole was some other bitches sorry” literally c!tubbo deserves an award for not pushing him into the hole
5K notes
·
View notes
Text
hihelo i made a cool thing!
a while ago @askoverkill made a couple posts about how they'd like a custom isat dialogue maker that had layer functionality, and i saw that and immediately took it up as a coding challenge :>
so i immediately started working on it, forgot about it for about 2 months, and then finished it up surprisingly quickly. it's still missing a lot of potential features, and everything is essentially the bear minimum to get it working, but hey, i learned how to use godot doing this and i'm proud of it and also it's really cool. did you know you can tell computers to do stuff??? that's so cool!!!
also, have to mention kongkrog's isat profile customizer here!!! it's what everyone's been using for a while now, and it has features that my take on this doesn't. it's really good, and i referenced its code quite a bit while making this
go mess around with it if you want! if you have any questions, suggestions, or bugs to report, feel free to bring it up either on the github, in my askbox, or on discord
251 notes
·
View notes
Text
A part of me will always love you
A part of me will always look for you
A part of me will always ponder into old memories
A part of me will always regret losing you
A part of me will always remember you
A part of me will never forget you
A part of me will never let you die
A part of me always dies remembering you
A part that you took while you left
A part I could never get back
A part that is a sweet torture
A part I lost while loving you.
Tshering Chekii
#my art#dsmp#mcyt#las nevadas#quackity#c!quackity#dsmp fanart#quackity fanart#this poem is also very ctommy coded
854 notes
·
View notes
Text
the most common purpled and tommy hybrid hcs (alien for purp, devil/imp for tom) are the personifications of their insecurities but idk if people are ready for that conversation
#dream smp#cpurpled#ctommy#dsmp#c!purpled#c!tommy#technically not a goldenboys post because it’s not about their connection it’s about their lore#‘idk if people are ready for that conversation’ is just code for me asking you guys if you want that explanation#this was a 3am thought and it hit me like a train#saying alien purpled is a headcanon just because he left it up for interpretation even though i take it as canon
252 notes
·
View notes